//
//  Fraction.m
//  
//
//  Created by blue on 16/4/10.
//
//

#import "Fraction.h"

@implementation Fraction
-(id)initWithDenominator:(NSInteger)denominator{
    self = [super init];
    if(self){
        _denominator = denominator;
    }
}
-(id)initWithMolecular:(NSInteger)molecular{
    _molecular = molecular;
}

-(id)initWithDenominator:(NSInteger)denominator
            andMolecular:(NSInteger)molecular{
    _denominator = denominator;
    _molecular = molecular;
}

//getter方法
-(NSInteger)denominator{
    return _denominator;
}
-(NSInteger)molecular{
    return _molecular;
}

-(void)addFraction:(Fraction *)aFraction;
-(void)subFraction:(Fraction *)aFraction;

@end
